package zhai.jvm;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;

/**
 * -Xms10m -Xmx10m -XX:+UseConcMarkSweepGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails　-XX:+HeapDumpOnOutOfMemoryError
 */
public class TestJVM {
    byte[] data = new byte[1024*100];

    public static void main(String[] args) throws InterruptedException {
        List<TestJVM> list = new ArrayList<>();
        while (true) {
            list.add(new TestJVM());
            TimeUnit.SECONDS.sleep(1);
        }
    }
}
